-
Notifications
You must be signed in to change notification settings - Fork 38.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use public conversion methods to avoid reflection #19047
Use public conversion methods to avoid reflection #19047
Conversation
GCE e2e build/test failed for commit 8f99260d60ed555d35a172b3f35cd6a12e407155. |
Labelling this PR as size/L |
8f99260
to
cff20bc
Compare
Labelling this PR as size/XL |
GCE e2e build/test failed for commit cff20bcb93f24c4927824463377d2b942d949e08. |
cff20bc
to
11593d3
Compare
GCE e2e test build/test passed for commit 11593d3ea3c9efed0ac301929934b212775a35c8. |
11593d3
to
d2771d7
Compare
Labelling this PR as size/L |
GCE e2e test build/test passed for commit d2771d74599ba22b2fe3680eff160137d8d76c62. |
Pretty big wins in conversion
|
d2771d7
to
6d5d7f9
Compare
GCE e2e test build/test passed for commit 6d5d7f9597532b5a11174867f859fcee5fa0cb6f. |
@k8s-bot unit test this |
@@ -529,6 +588,14 @@ func (g *conversionGenerator) writeFooter(b *buffer, indent int) { | |||
b.addLine("}\n", indent) | |||
} | |||
|
|||
func (g *conversionGenerator) conversionFunctionCall(inType, outType reflect.Type, scopeName string, args ...string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach - thanks!
Since this is replacing usage of "existsDedicatedConversionFunction" - can you please replace the only remaining call to it and remove it?
It generally LGTM. I added one comment. Feel free to self-apply lgtm label after applying comment and rebasing. Thanks! BTW - I will be leaving for paternity leave in O(days) for about a month, so I can't guarantee any responsiveness around that time... |
617d220
to
4d672c3
Compare
PR changed after LGTM, removing LGTM. |
Labelling this PR as size/XS |
@smarterclayton - there is something wrong with the PR (I can't see the diff - there were also some other PRs like that, so it's not your fault). I guess it was just a rebase, so please reapply the lgtm label (I can't see the diff) |
It was just a trivial rebase - new conversion method got generated and conflicted because of the existing generation. |
GCE e2e test build/test passed for commit 4d672c3. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e test build/test passed for commit 4d672c3. |
@k8s-bot unit test this |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test failed for commit 4d672c3. |
ok to test |
GCE e2e build/test failed for commit 4d672c3. |
@k8s-bot unit test this |
ok to test |
GCE e2e test build/test passed for commit 4d672c3. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e test build/test passed for commit 4d672c3. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e test build/test passed for commit 4d672c3. |
Automatic merge from submit-queue |
…_convert Auto commit by PR queue bot
Replace many of the remaining s.Convert() invocations with direct
execution, and make generated methods public. Removes 10% of the
allocations during decode of a pod and ~20-40% of the total CPU time.